package com.by.datasource.datapermission.processor;

import com.by.datasource.datapermission.DataPermissionSupport;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@AllArgsConstructor
public class DeptIdsProcessor implements DataPermissionProcessor{

    private DataPermissionSupport dataPermissionSupport;

    @Override
    public DataPermissionProcessor dpSupport(DataPermissionSupport dpSupport) {
        this.dataPermissionSupport = dpSupport;
        return this;
    }

    @Override
    public String columnName() {
        return "dp_dept_id";
    }

    @Override
    public List<Long> dataIds() {
        return dataPermissionSupport.deptIds();
    }
}
